package com.coreinnovationslab.phylib.units.convertors;

/**
 * ...
 * @author Anatoli Vladev
 */

class Temperature 
{
	private static var K_DIFF:Float = 273.15;
	private static var F_DIFF:Float = 32;
	
	public static function cToK( c:Float ):Float{
		return c + K_DIFF;
	}
					
	public static function cToF( c:Float ):Float{
		return c + F_DIFF;
	}
	
	public static function kToC( k:Float ):Float{
		return k - K_DIFF;
	}
	
	public static function kToF( k:Float ):Float{
		return cToF( kToC(k) );
	}
	
	public static function fToC( f:Float ):Float{
		return f - F_DIFF;
	}
	
	public static function fToK( f:Float ):Float{
		return cToK( fToC(f) );
	}
	
}